<?php
namespace core\tv\logic;

use core\Logic;
use core\tv\model\VideoCateModel;

class VideoLogic extends Logic
{

    /**
     * 获取视频分类列表
     * 
     * @param 
     * @return 
     */
    public function getVideoCate()
    {
        return VideoCateModel::getInstance()
        ->order('sort Desc')
        ->field('id as value,cate_name as name')
        ->select();
    }

    /**
     * 获取视频状态单选
     * 
     * @return array
     */
    public function getVideoStatus()
    {
        return [
            [
                'name'  => '正常',
                'value' => 1
            ],
            [
                'name'  => '禁用',
                'value' => 0
            ]
        ];
    }

    /**
     * 获取视频类型单选
     * 
     * @return array
     */
    public function getVideoType()
    {
        return [
            [
                'name'  => '多集',
                'value' => 1
            ],
            [
                'name'  => '单集',
                'value' => 0
            ]
        ];
    }

    /**
     * 获取视频类型单选
     * 
     * @return array
     */
    public function getPlayType()
    {
        return [
            [
                'name'  => '点播',
                'value' => 1
            ],
            [
                'name'  => '下载',
                'value' => 0
            ]
        ];
    }

}
